<#assign x= 10>
<#if x == 1>
  x is 1
<#elseif x == 2>
  x is 2
<#elseif x == 3>
  x is 3
<#elseif x gt 4>
  x is > 4
<#else>
  x is not 1 nor 2 nor 3 nor 4
</#if> 

序列
<#assign maple=['hhh','bbb','ccc','ddd','eee','ttt','hhh']> 
${maple?first} 

<#assign ls=[ 

{"name":"whale", "weight":2000}, 
{"name":"Barbara", "weight":53}, 

{"name":"zeppelin", "weight":-200}, 

{"name":"aardvark", "weight":30}, 

{"name":"beetroot", "weight":0.3} 

]> 

<#list ls?sort_by('name') as i> 

${i.name}:${i.weight} 

</#list>


<#list ls?sort_by('weight') as i> 

${i.name}:${i.weight} 

</#list> 


